Skip to content

Conversation

@jiangzho
Copy link
Contributor

What changes were proposed in this pull request?

Enhance existing test assertGeneratedCRDMatchesHelmChart to give diff upon failure

Why are the changes needed?

For better readability.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Self-contained upon success & manually tested failure scenario - e.g. remove some fields from CRD inhelm repo, the test would fail with message like

* What went wrong:
Execution failed for task ':spark-operator-api:assertGeneratedCRDMatchesHelmChart'.
> Generated CRD yaml does not match the staged version in Helm Chart, please keep the chart updated.

  === SparkApplication CRD Differences ===
  --- /dev/fd/63        2025-10-31 14:33:55
  +++ /dev/fd/62        2025-10-31 14:33:55
  @@ -6355,11 +6355,6 @@
           properties:
             currentAttemptSummary:
               properties:
  -              attemptInfo:
  -                properties:
  -                  id:
  -                    type: integer
  -                type: object
                 stateTransitionHistory:
                   additionalProperties:
                     properties:

  === SparkCluster CRD Differences ===
  --- /dev/fd/63        2025-10-31 14:33:55
  +++ /dev/fd/62        2025-10-31 14:33:55
  @@ -7218,8 +7218,6 @@
                         type: string
                       lastTransitionTime:
                         type: string
  -                    message:
  -                      type: string
                     type: object
                   type: object
               type: object

Which gives a more clear indication about the exact failure

Was this patch authored or co-authored using generative AI tooling?

No

### What changes were proposed in this pull request?

Enhance existing test assertGeneratedCRDMatchesHelmChart to give diff upon failure

### Why are the changes needed?

For better readability.

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

Self-contained upon success & manually tested failure scenario - e.g. remove some fields from CRD inhelm repo, the test would fail with message like

```
* What went wrong:
Execution failed for task ':spark-operator-api:assertGeneratedCRDMatchesHelmChart'.
> Generated CRD yaml does not match the staged version in Helm Chart, please keep the chart updated.

  === SparkApplication CRD Differences ===
  --- /dev/fd/63        2025-10-31 14:33:55
  +++ /dev/fd/62        2025-10-31 14:33:55
  @@ -6355,11 +6355,6 @@
           properties:
             currentAttemptSummary:
               properties:
  -              attemptInfo:
  -                properties:
  -                  id:
  -                    type: integer
  -                type: object
                 stateTransitionHistory:
                   additionalProperties:
                     properties:

  === SparkCluster CRD Differences ===
  --- /dev/fd/63        2025-10-31 14:33:55
  +++ /dev/fd/62        2025-10-31 14:33:55
  @@ -7218,8 +7218,6 @@
                         type: string
                       lastTransitionTime:
                         type: string
  -                    message:
  -                      type: string
                     type: object
                   type: object
               type: object
```

Which gives a more clear indication about the exact failure

### Was this patch authored or co-authored using generative AI tooling?

No
@jiangzho
Copy link
Contributor Author

cc @peter-toth for review - thanks a lot in advance!

@peter-toth peter-toth closed this in 68f719c Nov 1, 2025
@peter-toth
Copy link
Contributor

Thank you @jiangzho, merged to main (0.6.0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants